//
//  SVProgressHUD+Extension.m
//  Lottery
//
//  Created by 桑赐相 on 2018/7/25.
//  Copyright © 2018年 桑赐相. All rights reserved.
//

#import "SVProgressHUD+Extension.h"

@implementation SVProgressHUD (Extension)

+(void)showLoading:(NSString *)message{
    [self showLoading:message toView:nil];
}

+(void)showLoading:(NSString *)message toView:(UIView *)view{
    [self showLoadingWithStatus:message maskType:SVProgressHUDMaskTypeClear withView:view withOffset:UIOffsetZero];
}

+(void)showSuccess:(NSString *)message{
    
}

+(void)dismiss:(NSTimeInterval)timeInterVal{
    [SVProgressHUD dismiss];
}

+(void)toast:(NSString *)message{
    
}

+(void)showLoadingWithStatus:(NSString *)status maskType:(SVProgressHUDMaskType)maskType withView:(UIView *)view withOffset:(UIOffset)offset{
    
    [SVProgressHUD popActivity];
    [SVProgressHUD setOffsetFromCenter:offset];
    [SVProgressHUD setContainerView:view];
    [SVProgressHUD setDefaultMaskType:maskType];
    [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
    [SVProgressHUD setForegroundColor:[UIColor whiteColor]];
    [SVProgressHUD setBackgroundColor:[UIColor colorWithWhite:0.2 alpha:0.7]];
    [SVProgressHUD setCornerRadius:5.0];
    [SVProgressHUD showWithStatus:status];
    
}



@end
